#ifndef STX_ALGORITHM_ACCUMULATE_HPP
#define STX_ALGORITHM_ACCUMULATE_HPP

#include <stx/algorithm/common.hpp>

namespace stx {

template <class InputIterator, class T>
inline T
accumulate(InputIterator first, InputIterator last, T init)
{
    for (; first != last; ++first) {
        init = init + *first;
    }
    return init;
}

} // namespace stx

#endif // STX_ALGORITHM_ACCUMULATE_HPP
